package net.template.domain;

import com.fasterxml.jackson.annotation.JsonInclude;

import javax.persistence.Column;
import javax.persistence.*;

/**
 * item
 * @author zuowenjie
 */
@Entity
@Table(name = "item")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Item {

    private Integer id;
    private String itemType;
    private String itemLabel;
    private String itemDisable;
    private String itemReadonly;
    private String itemValue;
    private String itemPlaceholder;
    private String itemKey;
    private String itemSubtype;
    private String itemText;
    private String itemRules;
    private Integer columnAttrId;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(nullable = false, unique = true)
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getItemType() {
        return itemType;
    }

    public void setItemType(String itemType) {
        this.itemType = itemType;
    }

    public String getItemLabel() {
        return itemLabel;
    }

    public void setItemLabel(String itemLabel) {
        this.itemLabel = itemLabel;
    }

    public String getItemDisable() {
        return itemDisable;
    }

    public void setItemDisable(String itemDisable) {
        this.itemDisable = itemDisable;
    }

    public String getItemReadonly() {
        return itemReadonly;
    }

    public void setItemReadonly(String itemReadonly) {
        this.itemReadonly = itemReadonly;
    }

    public String getItemValue() {
        return itemValue;
    }

    public void setItemValue(String itemValue) {
        this.itemValue = itemValue;
    }

    public String getItemPlaceholder() {
        return itemPlaceholder;
    }

    public void setItemPlaceholder(String itemPlaceholder) {
        this.itemPlaceholder = itemPlaceholder;
    }

    public String getItemKey() {
        return itemKey;
    }

    public void setItemKey(String itemKey) {
        this.itemKey = itemKey;
    }

    public String getItemSubtype() {
        return itemSubtype;
    }

    public void setItemSubtype(String itemSubtype) {
        this.itemSubtype = itemSubtype;
    }

    public String getItemText() {
        return itemText;
    }

    public void setItemText(String itemText) {
        this.itemText = itemText;
    }

    public String getItemRules() {
        return itemRules;
    }

    public void setItemRules(String itemRules) {
        this.itemRules = itemRules;
    }

    public Integer getColumnAttrId() {
        return columnAttrId;
    }

    public void setColumnAttrId(Integer columnAttrId) {
        this.columnAttrId = columnAttrId;
    }

    public void createItem(String itemType, String itemLabel, String itemDisable, String itemReadonly, String itemValue, String itemPlaceholder, String itemKey, String itemSubtype, String itemText, String itemRules, Integer columnAttrId) {
        this.itemType = itemType;
        this.itemLabel = itemLabel;
        this.itemDisable = itemDisable;
        this.itemReadonly = itemReadonly;
        this.itemValue = itemValue;
        this.itemPlaceholder = itemPlaceholder;
        this.itemKey = itemKey;
        this.itemSubtype = itemSubtype;
        this.itemText = itemText;
        this.itemRules = itemRules;
        this.columnAttrId = columnAttrId;
    }
}
